﻿using MQTTnet.Server;
using MQTTnet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Artizan.Iot.Hub.Mqtt.Server;

namespace Artizan.Iot.Hub.Mqtt.Topics
{
    public static class MqttTopicHelper
    {
        public static bool IsSystemTopic(string topic)
        {
            return topic.StartsWith(BrokerTopics.SysTopisPrefix, StringComparison.OrdinalIgnoreCase);
        }

        public static bool IsBrokerItself(string clientId)
        {
            return clientId == MqttServiceConsts.IotHubMqttClientId;
        }
    }
}
